(global.webpackJsonp = global.webpackJsonp || []).push([ [ "pages/public/poster/children/sh-groupon-poster" ], {
    "0f54": function(t, e, n) {
        n.r(e);
        var o, a = n("53ba"), i = n.n(a);
        for (o in a) "default" !== o && function(t) {
            n.d(e, t, function() {
                return a[t];
            });
        }(o);
        e.default = i.a;
    },
    2530: function(t, e, n) {
        n.d(e, "b", function() {
            return o;
        }), n.d(e, "c", function() {
            return a;
        }), n.d(e, "a", function() {});
        var o = function() {
            this.$createElement;
            this._self._c;
        }, a = [];
    },
    "53ba": function(t, c, u) {
        (function(t) {
            Object.defineProperty(c, "__esModule", {
                value: !0
            }), c.default = void 0;
            var o = e(u("a34a")), i = e(u("a23b")), r = u("99e8");
            function e(t) {
                return t && t.__esModule ? t : {
                    default: t
                };
            }
            function l(t, e, n, o, a, i, r) {
                try {
                    var c = t[i](r), l = c.value;
                } catch (t) {
                    return n(t), 0;
                }
                c.done ? e(l) : Promise.resolve(l).then(o, a);
            }
            function n(e, t) {
                var n, o = Object.keys(e);
                return Object.getOwnPropertySymbols && (n = Object.getOwnPropertySymbols(e), t && (n = n.filter(function(t) {
                    return Object.getOwnPropertyDescriptor(e, t).enumerable;
                })), o.push.apply(o, n)), o;
            }
            var a = {
                components: {},
                mixins: [ "shoproShare" ],
                data: function() {
                    return {
                        poster: {},
                        canvasId: "groupon_poster",
                        goodsInfo: {},
                        scene: ""
                    };
                },
                computed: function(o) {
                    for (var t = 1; t < arguments.length; t++) {
                        var a = null != arguments[t] ? arguments[t] : {};
                        t % 2 ? n(Object(a), !0).forEach(function(t) {
                            var e, n;
                            e = o, t = a[n = t], n in e ? Object.defineProperty(e, n, {
                                value: t,
                                enumerable: !0,
                                configurable: !0,
                                writable: !0
                            }) : e[n] = t;
                        }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(o, Object.getOwnPropertyDescriptors(a)) : n(Object(a)).forEach(function(t) {
                            Object.defineProperty(o, t, Object.getOwnPropertyDescriptor(a, t));
                        });
                    }
                    return o;
                }({}, (0, (e(u("e2cb")), u("26cb")).mapState)({
                    userInfo: function(t) {
                        return t.user.userInfo;
                    },
                    shareData: function(t) {
                        return t.init.initData.share;
                    }
                })),
                props: {},
                created: function() {
                    var t = this;
                    t.goodsInfo = t.$Route.query, t.goodsInfo.image = decodeURIComponent(t.$Route.query.image), 
                    t.goodsInfo.title = decodeURIComponent(t.$Route.query.title), t.setShareInfo({
                        query: {
                            url: "groupon-" + t.$Route.query.id
                        },
                        title: t.goodsInfo.title,
                        image: t.goodsInfo.image
                    }), t.shareInfo && setTimeout(function() {
                        t.$emit("getShareInfo", t.shareInfo), t.scene = encodeURIComponent(t.shareInfo.path.split("?")[1]), 
                        t.shareFc();
                    }, 100);
                },
                methods: {
                    shareFc: function() {
                        var c, n = this;
                        return c = o.default.mark(function t() {
                            var a, e;
                            return o.default.wrap(function(t) {
                                for (;;) switch (t.prev = t.next) {
                                  case 0:
                                    return a = n, t.prev = 1, console.log("准备生成:" + new Date()), t.next = 5, (0, r.getSharePoster)({
                                        _this: n,
                                        type: "grouponPoster",
                                        formData: {},
                                        posterCanvasId: n.canvasId,
                                        delayTimeScale: 20,
                                        drawDelayTime: 500,
                                        drawArray: function(t) {
                                            var n = t.bgObj, o = (t.type, t.bgScale, n.width, .042 * n.width);
                                            return n.height, new Promise(function(t, e) {
                                                t([ {
                                                    type: "image",
                                                    url: a.$tools.checkImgHttp(a.userInfo.avatar),
                                                    alpha: 1,
                                                    dx: .06 * n.width,
                                                    dy: .06 * n.width,
                                                    infoCallBack: function(t) {
                                                        var e = .1 * n.width / t.height;
                                                        return {
                                                            circleSet: {
                                                                x: t.width * e / 2,
                                                                y: .1 * n.width / 2,
                                                                r: .1 * n.width / 2
                                                            },
                                                            dWidth: t.width * e,
                                                            dHeight: .1 * n.width
                                                        };
                                                    }
                                                }, {
                                                    type: "text",
                                                    text: a.userInfo.nickname,
                                                    size: o,
                                                    color: "#fff",
                                                    alpha: 1,
                                                    infoCallBack: function(t) {
                                                        return i.default.log("index页面的text的infocallback ，textlength:" + t), {
                                                            dx: .2 * n.width,
                                                            dy: .08 * n.width
                                                        };
                                                    },
                                                    serialNum: 0,
                                                    id: "tag1"
                                                }, {
                                                    type: "text",
                                                    text: "发现一个好物，快来和我一起拼吧！",
                                                    size: .9 * o,
                                                    color: "#fff",
                                                    alpha: 1,
                                                    infoCallBack: function(t) {
                                                        return i.default.log("index页面的text的infocallback ，textlength:" + t), {
                                                            dx: .2 * n.width,
                                                            dy: .15 * n.width
                                                        };
                                                    },
                                                    serialNum: 0,
                                                    id: "tag1"
                                                }, {
                                                    type: "image",
                                                    url: a.$tools.checkImgHttp(a.goodsInfo.image),
                                                    alpha: 1,
                                                    drawDelayTime: 500,
                                                    dx: .054 * n.width,
                                                    dy: .2 * n.width,
                                                    infoCallBack: function(t) {
                                                        return {
                                                            dWidth: .9 * n.width,
                                                            dHeight: .9 * n.width
                                                        };
                                                    }
                                                }, {
                                                    type: "text",
                                                    text: a.goodsInfo.title,
                                                    size: .9 * o,
                                                    color: "black",
                                                    alpha: 1,
                                                    textAlign: "left",
                                                    textBaseline: "middle",
                                                    lineFeed: {
                                                        maxWidth: .91 * n.width,
                                                        lineHeight: .06 * n.width,
                                                        lineNum: 2,
                                                        dx: -1
                                                    },
                                                    infoCallBack: function(t) {
                                                        return i.default.log("index页面的text的infocallback ，textlength:" + t), {
                                                            dx: .06 * n.width,
                                                            dy: 1.18 * n.width
                                                        };
                                                    },
                                                    serialNum: 0
                                                }, {
                                                    type: "text",
                                                    text: "拼团价：￥",
                                                    size: .8 * o,
                                                    color: "#E1212B",
                                                    alpha: 1,
                                                    textAlign: "left",
                                                    textBaseline: "middle",
                                                    infoCallBack: function(t) {
                                                        return i.default.log("index页面的text的infocallback ，textlength:" + t), {
                                                            dx: .06 * n.width,
                                                            dy: 1.34 * n.width
                                                        };
                                                    },
                                                    serialNum: 0
                                                }, {
                                                    type: "text",
                                                    text: "".concat(a.goodsInfo.price),
                                                    size: 1.1 * o,
                                                    color: "#E1212B",
                                                    alpha: 1,
                                                    textAlign: "left",
                                                    textBaseline: "middle",
                                                    fontWeight: "bold",
                                                    infoCallBack: function(t) {
                                                        return i.default.log("index页面的text的infocallback ，textlength:" + t), {
                                                            dx: .24 * n.width,
                                                            dy: 1.34 * n.width
                                                        };
                                                    },
                                                    serialNum: 0
                                                }, {
                                                    type: "text",
                                                    text: "".concat(a.goodsInfo.teamNum, "人团"),
                                                    size: .8 * o,
                                                    color: "#fff",
                                                    alpha: 1,
                                                    textAlign: "right",
                                                    infoCallBack: function(t) {
                                                        return i.default.log("index页面的text的infocallback ，textlength:" + t), {
                                                            dx: .926 * n.width,
                                                            dy: 1.325 * n.width
                                                        };
                                                    },
                                                    serialNum: 0
                                                }, {
                                                    type: "image",
                                                    url: "".concat(a.$API_URL, "wechat/wxacode?scene=").concat(a.scene),
                                                    alpha: 1,
                                                    drawDelayTime: 500,
                                                    dx: n.width - .2 * n.width,
                                                    dy: n.height - .18 * n.width,
                                                    infoCallBack: function(t) {
                                                        return {
                                                            dWidth: .14 * n.width,
                                                            dHeight: .14 * n.width
                                                        };
                                                    }
                                                } ]);
                                            });
                                        },
                                        setCanvasWH: function(t) {
                                            var e = t.bgObj;
                                            t.type, t.bgScale, n.poster = e;
                                        }
                                    });

                                  case 5:
                                    e = t.sent, n.$set(n.poster, "finalPath", e.poster.tempFilePath), t.next = 14;
                                    break;

                                  case 9:
                                    t.prev = 9, t.t0 = t.catch(1), i.default.hideLoading(), i.default.showToast(JSON.stringify(t.t0)), 
                                    console.log(JSON.stringify(t.t0));

                                  case 14:
                                  case "end":
                                    return t.stop();
                                }
                            }, t, null, [ [ 1, 9 ] ]);
                        }), function() {
                            var t = this, r = arguments;
                            return new Promise(function(e, n) {
                                var o = c.apply(t, r);
                                function a(t) {
                                    l(o, e, n, a, i, "next", t);
                                }
                                function i(t) {
                                    l(o, e, n, a, i, "throw", t);
                                }
                                a(void 0);
                            });
                        }();
                    },
                    saveImage: function() {
                        var e = this;
                        "wxOfficialAccount" === t.getStorageSync("platform") ? e.$tools.toast("长按图片保存") : t.saveImageToPhotosAlbum({
                            filePath: e.poster.finalPath,
                            success: function(t) {
                                e.$tools.toast("保存成功");
                            },
                            fail: function(t) {
                                e.$tools.toast("保存失败");
                            }
                        });
                    },
                    share: function() {},
                    copyLink: function() {
                        t.setClipboardData({
                            data: this.shareInfo.copyLink,
                            success: function() {}
                        });
                    }
                }
            };
            c.default = a;
        }).call(this, u("543d").default);
    },
    "54de": function(t, e, n) {
        var o = n("a49a");
        n.n(o).a;
    },
    "60e1": function(t, e, n) {
        n.r(e);
        var o, a = n("2530"), i = n("0f54");
        for (o in i) "default" !== o && function(t) {
            n.d(e, t, function() {
                return i[t];
            });
        }(o);
        n("54de");
        var r = n("f0c5"), a = Object(r.a)(i.default, a.b, a.c, !1, null, null, null, !1, a.a, void 0);
        e.default = a.exports;
    },
    a49a: function(t, e, n) {}
} ]), (global.webpackJsonp = global.webpackJsonp || []).push([ "pages/public/poster/children/sh-groupon-poster-create-component", {
    "pages/public/poster/children/sh-groupon-poster-create-component": function(t, e, n) {
        n("543d").createComponent(n("60e1"));
    }
}, [ [ "pages/public/poster/children/sh-groupon-poster-create-component" ] ] ]);